﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DataLoad.iContact.WinClient
{
    public partial class frmContactSummary : Form
    {
        public frmContactSummary()
        {
            InitializeComponent();
        }

        public DialogResult Show(List<DLContact> contacts)
        {
            _contacts = contacts;

            lstContacts.Items.Clear();

            foreach (DLContact contact in _contacts)
            {
                lstContacts.Items.Add(contact);
            }

            return ShowDialog();
        }

        private List<DLContact> _contacts;

        public List<DLContact> SelectedItems
        {
            get
            {
                List<DLContact> result = new List<DLContact>();
                foreach (DLContact contact in lstContacts.SelectedItems)
                {
                    result.Add(contact);
                }

                return result;
            }
        }
    }
}
